var express = require('express');
var router = express.Router();

var goods = [
  {
    "title":"德芙",
    "price":"69.9",
    "img":"/images/pic1.jpg"
  },
  {
    "title":"费列罗",
    "price":"63",
    "img":"/images/pic1.jpg"
  },
  {
    "title":"大民",
    "price":"29.9",
    "img":"/images/pic1.jpg"
  },
];

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
});

router.get('/goods',function(req,res){
  res.render('goods.pug',{data:goods});
});

module.exports = router;
